package com.ywk.junit.business.controller;

import com.ywk.junit.business.entity.Student;
import com.ywk.junit.business.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author zbh
 * @Date 2023/6/28
 */
@RestController
@RequestMapping("/student")
public class StudentController {

    @Autowired
    StudentService service;

    @GetMapping("/getCount")
    public void getCount(){
        System.out.println(service.getCount());
    }

    @GetMapping("/findAll")
    public List<Student> findAll(){
        return service.findAll();
    }
}
